import {
    Entity,
    PrimaryGeneratedColumn,
    Column,
    BeforeInsert
} from 'typeorm';
import * as bcrypt from 'bcryptjs'

@Entity('im_chat_message') // 指定表名称为 'im_chat_message'
export class ChatMessage {
    @PrimaryGeneratedColumn({ comment: '消息id 主键id', })
    message_id: string;
    @Column({ comment: '发送者id', })
    send_user_id: string;
    @Column({ comment: '接收者id', })
    receive_user_id: string;
    @Column({ comment: '聊天室id', })
    chatRoom_id: string;
    @Column({ comment: '内容', })
    content: string;

    @Column({
        comment: '发送时间',
        name: 'create_time',
        type: 'timestamp',
        default: () => 'CURRENT_TIMESTAMP',
    })
    send_time: Date;
}



